local Aloft = Aloft
if not Aloft then return end
local AloftModules = AloftModules
if not AloftModules then return end

-----------------------------------------------------------------------------

AloftModules:AddInitializer("AloftFaction", function()

if not Aloft:GetModule("FactionData", true) then return end
if not AloftLocale or not AloftLocale.AloftFactionData then return end

-----------------------------------------------------------------------------

local AloftFactionData = Aloft:GetModule("FactionData")

local L = AloftLocale.AloftFactionData

-----------------------------------------------------------------------------

Aloft.Options.args.data.args.faction =
{
	type = 'toggle',
	width = 'full',
	name = L["Save Faction Data"],
	desc = L["Stores faction data between sessions"],
	get = function(i) return AloftFactionData.db.profile.save end,
	set = AloftFactionData.SetSaveData,
}

-----------------------------------------------------------------------------

end)
